Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yufrontin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yufrontin

lightweight yaml front matter extractor using yaml.js

  • 0.1.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

yufrontin

NPM version schoolmarm-standard-style experimental Downloads

lightweight yaml front matter extractor using yaml.js

The core of yaml.js is included within the lib directory. I did not feel the need to use the entire repo as a dependency when I would only use the core. This keeps the size of the project small. License file for yaml.js is included.

Installation

$ npm install yufrontin

Usage

yufrontin('---\ntitle: \'me\'\n---\nHello World')
// results in  -->
{ data: { title: 'me' }, content: 'Hello World' }

yufrontin('Hello World')
{ data: {}, content: 'Hello World' }

or you could do this:

var fs = require('fs')
var parsefm = require('parse-yuf')

var file = fs.readFileSync('some/file/to/be/read.md', 'utf8')
yufrontin(file)

parsefm('some/file/to/be/read.md')


API

yufrontin(inputString)
  • inputString [String] data to be parsed by yaml.js
  • return [Object]

Why?

Why another yaml front matter extractor? I wanted to try yaml.js.

See Also

  • parse-yuf: read in a file to be parsed by yufrontin returning an extended results or output from yaml.js
  • gray-matter: My all time favorite YAML front matter parser before yufrontin.
  • front-matter-extractor: the code base which yufrontin is shamelessly based on.
  • yamljs: yaml engine used here.

License

ISC

Keywords

FAQs

Package last updated on 20 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc